package com.zhangh.summer.admin.support.session;

import com.zhangh.summer.admin.support.utils.DateUtil;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @description: TODO
 * @author: zhanghui  zhanghlucky@163.com
 * @create: 2021-06-10 17:45
 **/
@Data
public class SessionUser implements Serializable {
    private Long userID;
    private String userName;
    private String loginName;
    private Long orgID;
    private String orgName;
    private Date loginTime;
    private String token;
    private String ip;
    private String mac;

    public static SessionUser emptyUser(){
        SessionUser user=new SessionUser();
        user.setUserID(0L);
        user.setUserName("");
        user.setLoginName("");
        user.setOrgID(0L);
        user.setOrgName("");
        user.setLoginTime(DateUtil.zeroDate());
        user.setToken("");
        user.setIp("");
        user.setMac("");
        return user;
    }
}
